package top.toptimus.dto.order.orderSync.orderCommit;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * 订单索引DTO
 *
 * @author gaoyu
 */
@Data
@NoArgsConstructor
public class OrderStatusIndexDTO {
    private String orderId;
    /**
     * 销售渠道信息
     */
    private String salesType;   //  销售方式    top.toptimus.constValue.SalesTypeConsts
    private String salesChannel;    //  销售渠道
    /**
     * 客户信息
     */
    private String customerId;
    private String customerName;
    private String consignee;   //  收件人
    private String mobile;
    private String addressId;
    private String addressProvince;//省
    private String addressCity;//市
    private String addressDistrict;//区
    private String addressDetail;//详细地址
    private String zipCode;//邮编
    /**
     * 面料信息
     */
    private String materialNameCn;//面料描述名称
    private String materialCode;  //面料号
    private String composition;//面料成分
    /**
     * 款式信息
     */
    private String styleSizeCd;//尺码
    private String styleNameCn;//款式名称
    private String refStyleId;  //  标准款id
    /**
     * 订单信息
     */
    private String orderNo; //  订单号
    private Double quantity;    //  订单数量
    private Date orderDate;//订单时间
    /**
     * 订单状态
     */
    private String orderStatus; //  订单状态    @See top.toptimus.constValue.PMCOrderStatusConsts
    /**
     * 门店信息，也就是订单类别
     */
    private String shopId;
    private String shopName;

    public OrderStatusIndexDTO(
            String orderId,
            String customerId,
            String customerName,
            String consignee,
            String mobile,
            String addressId,
            String addressProvince,
            String addressCity,
            String addressDistrict,
            String addressDetail,
            String zipCode,
            String materialNameCn,
            String materialCode,
            String composition,
            String styleSizeCd,
            String styleNameCn,
            String refStyleId,
            String orderNo,
            Double quantity,
            Date orderDate,
            String orderStatus,
            String shopId,
            String shopName
    ) {
        this.orderId = orderId;
        this.customerId = customerId;
        this.customerName = customerName;
        this.consignee = consignee;
        this.mobile = mobile;
        this.addressId = addressId;
        this.addressProvince = addressProvince;
        this.addressCity = addressCity;
        this.addressDistrict = addressDistrict;
        this.addressDetail = addressDetail;
        this.zipCode = zipCode;
        this.materialNameCn = materialNameCn;
        this.materialCode = materialCode;
        this.composition = composition;
        this.styleSizeCd = styleSizeCd;
        this.styleNameCn = styleNameCn;
        this.refStyleId = refStyleId;
        this.orderNo = orderNo;
        this.quantity = quantity;
        this.orderDate = orderDate;
        this.orderStatus = orderStatus;
        this.shopId = shopId;
        this.shopName = shopName;
    }

    public OrderStatusIndexDTO build(
            String salesType,
            String salesChannel
    ) {
        this.salesType = salesType;
        this.salesChannel = salesChannel;
        return this;
    }

    public void build(
            String orderStatus
    ) {
        this.orderStatus = orderStatus;
    }
}
